﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Dao.AccountDao
{
    public class AccountDao
    {
        public bool Login(string username,string pwd)
        {
            bool result = false;

            string sql = @"SELECT UserName FROM Account
                            WHERE UserName='" + username + "' and PassWord='" + pwd + "'";

            DataSet ds = AccessBase.dataSet(sql);

            if(ds.Tables[0].Rows.Count>0)
            {
                result = true;
            }

            return result;
        }
    }
}
